import 'package:flutter/material.dart';
import 'package:flutter_div/flutter_div.dart';

void main() {
  runApp(const MyApp());
}

class MyApp extends StatefulWidget {
  const MyApp({super.key});

  @override
  State<MyApp> createState() => _MyAppState();
}

class _MyAppState extends State<MyApp> {

  @override
  void initState() {
    super.initState();
  }

  @override
  Widget build(BuildContext context) {
    return MaterialApp(
      home: Scaffold(
        appBar: AppBar(
          title: const Text('Plugin example app'),
        ),
        body: Center(
          child: DivCol(
            children: [
              Div(
                style: DivStyle().mtb(10).mlr(10).ma(1),
                child: Text('Div'),
              ),
              DivButton(
                disable: false,
                style: DivStyle(width: 100, height: 30, color: Colors.red, align: Alignment.center),
                child: Text('按钮1231', style: TextStyle(color: Colors.white),),
                onTap:() async{
                  await Future.delayed(Duration(seconds: 5));
                  return false;
                },
              ),
            ]
          ),
        ),
      ),
    );
  }
}
